package com.fuyao.cloud.space.api.feign;

import cn.hutool.core.lang.tree.Tree;
import com.fuyao.cloud.common.core.util.R;
import com.fuyao.cloud.space.entity.RoomHouse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * 房间远程接口远程接口
 *
 * @author lyhil
 * @date 2021/11/23
 */
@FeignClient(contextId = "remoteHouseService", value = "cloud-space-biz")
public interface RemoteHouseService {


	/**
	 * 获取房间树集合
	 * @return 房间树集合。
	 */
	@GetMapping("/fyroomhouse/tree")
	R<List<Tree<Long>>> getTree();

	/**
	 * 获取仓库树集合
	 * @return 仓库树集合。
	 */
	@GetMapping("/fyroomhouse/warehouseTree")
	R<List<Tree<Long>>> warehouseTree();

	/**
	 * 获取房间树集合
	 * @return 房间树集合。
	 */
	@GetMapping("/fyroomhouse/{id}")
	R<RoomHouse> getById(@PathVariable("id") Long id);
}
